package com.naiterui.ehp.bs.cms.modules.recommend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.naiterui.ehp.bp.bo.esign.PreSignResultBO;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.cms.common.vo.PageParamsVO;
import com.naiterui.ehp.bs.cms.common.vo.PageVO;
import com.naiterui.ehp.bs.cms.modules.recommend.entity.MedicationRecom;
import com.naiterui.ehp.bs.cms.modules.recommend.vo.MedicationRecomDetailVO;
import com.naiterui.ehp.bs.cms.modules.recommend.vo.MedicationRecomVO;
import com.naiterui.ehp.bs.cms.modules.recommend.vo.QrcodeVO;
import com.naiterui.ehp.bs.cms.modules.recommend.vo.RecomAuditOperationLogVO;
import com.naiterui.ehp.bs.cms.modules.recommend.vo.VerifyIdentityVO;
import com.naiterui.ehp.bs.cms.modules.user.vo.SelectPharmacistVO;

public interface IMedicationRecomService extends IService<MedicationRecom> {


    /**
     * 处方审核日志
     *
     * @param recomId
     * @return
     */
    PageVO<RecomAuditOperationLogVO> auditLogs(PageParamsVO pageParamsVO, Long recomId);

    VerifyIdentityVO verifyIdentity(Long userId);

    void setIdentity(Long userId, Long pharmacistId, String idCard) throws BusinessException;

    PreSignResultBO preSign(Long userId, Long recomId) throws BusinessException;

    void audit(Long userId, Long recomId, Integer status, String remark, Integer force, String signPwd,String uniqueId) throws BusinessException;

    /**
     * 发送实名校验验证码
     *
     * @param phone
     * @throws BusinessException
     */
    void realnameCode(String phone) throws BusinessException;

    /**
     * 根据手机号和验证码获取药师
     *
     * @param phone
     * @param verifyCode
     * @return
     * @throws BusinessException
     */
    SelectPharmacistVO getPharmacistByPhone(String phone, String verifyCode) throws BusinessException;

    /**
     * 分页查询处方列表
     *
     * @param pageParamsVO
     * @param medicationRecom
     * @return
     */
    PageVO<MedicationRecomVO> recomList(PageParamsVO pageParamsVO, MedicationRecomVO medicationRecom, boolean verifyPh) throws BusinessException;


    /**
     * 查询处方详情
     *
     * @param recomId
     * @return
     */
    MedicationRecomDetailVO recomDetail(Long recomId, boolean verifyPh) throws BusinessException;

    void setIdentityUncheck(Long userId, String phone, String idCard) throws BusinessException;


    /**
     * 生成qrcode值
     *
     * @param userId
     * @return
     */
    QrcodeVO qrcode(Long userId, String uuid) throws BusinessException;

    /**
     * 解绑药师
     *
     * @param userId
     */
    void untie(Long userId) throws BusinessException;
}
